import Vue from 'vue'
import App from './App.vue'
import vueRouter from 'vue-router'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
// 全局配置axios以处理FormData
import axios from 'axios';
axios.defaults.headers.post['Content-Type'] = 'multipart/form-data';

// 全局错误处理
Vue.config.errorHandler = function(err, vm, info) {
  console.error('Vue全局错误:', err, info);
};
Vue.prototype.axios = axios;

Vue.use(ElementUI);
// 使用vueRouter
Vue.use(vueRouter)
Vue.config.productionTip = false
new Vue({
  render: h => h(App),
  router,
}).$mount('#app')
